﻿using System;
using System.IO;

// Token: 0x020002D6 RID: 726
[Serializable]
public abstract class CharFileInfoStatus : global::BlockControlBase
{
	// Token: 0x0600119D RID: 4509 RVA: 0x0008FAA0 File Offset: 0x0008DCA0
	public CharFileInfoStatus() : base("ステータス情報", 4)
	{
		this.showAccessory = new bool[10];
	}

	// Token: 0x0600119E RID: 4510 RVA: 0x0008FB1C File Offset: 0x0008DD1C
	public void MemberInitialize()
	{
		for (int i = 0; i < this.clothesState.Length; i++)
		{
			this.clothesState[i] = 0;
		}
		for (int j = 0; j < this.showAccessory.Length; j++)
		{
			this.showAccessory[j] = true;
		}
	}

	// Token: 0x0600119F RID: 4511 RVA: 0x0008FB70 File Offset: 0x0008DD70
	public override byte[] SaveBytes()
	{
		byte[] result;
		using (MemoryStream memoryStream = new MemoryStream())
		{
			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
			{
				binaryWriter.Write((int)this.coordinateType);
				binaryWriter.Write(10);
				for (int i = 0; i < this.showAccessory.Length; i++)
				{
					binaryWriter.Write(this.showAccessory[i]);
				}
				binaryWriter.Write(this.eyesPtn);
				binaryWriter.Write(this.eyesOpen);
				binaryWriter.Write(this.eyesOpenMin);
				binaryWriter.Write(this.eyesOpenMax);
				binaryWriter.Write(this.eyesFixed);
				binaryWriter.Write(this.mouthPtn);
				binaryWriter.Write(this.mouthOpen);
				binaryWriter.Write(this.mouthOpenMin);
				binaryWriter.Write(this.mouthOpenMax);
				binaryWriter.Write(this.mouthFixed);
				binaryWriter.Write(this.tongueState);
				binaryWriter.Write(this.eyesLookPtn);
				binaryWriter.Write(this.eyesTargetNo);
				binaryWriter.Write(this.eyesTargetRate);
				binaryWriter.Write(this.neckLookPtn);
				binaryWriter.Write(this.neckTargetNo);
				binaryWriter.Write(this.neckTargetRate);
				binaryWriter.Write(this.eyesBlink);
				binaryWriter.Write(this.disableShapeMouth);
				this.SaveSub(binaryWriter);
				result = memoryStream.ToArray();
			}
		}
		return result;
	}

	// Token: 0x060011A0 RID: 4512 RVA: 0x0008FD18 File Offset: 0x0008DF18
	public override bool LoadBytes(byte[] data, int statusVer)
	{
		bool result;
		using (MemoryStream memoryStream = new MemoryStream(data))
		{
			using (BinaryReader binaryReader = new BinaryReader(memoryStream))
			{
				this.coordinateType = (global::CharDefine.CoordinateType)binaryReader.ReadInt32();
				int num = binaryReader.ReadInt32();
				for (int i = 0; i < num; i++)
				{
					this.showAccessory[i] = binaryReader.ReadBoolean();
				}
				this.eyesPtn = binaryReader.ReadInt32();
				this.eyesOpen = binaryReader.ReadSingle();
				if (4 <= statusVer)
				{
					this.eyesOpenMin = binaryReader.ReadSingle();
					this.eyesOpenMax = binaryReader.ReadSingle();
				}
				this.eyesFixed = binaryReader.ReadSingle();
				this.mouthPtn = binaryReader.ReadInt32();
				this.mouthOpen = binaryReader.ReadSingle();
				if (4 <= statusVer)
				{
					this.mouthOpenMin = binaryReader.ReadSingle();
					this.mouthOpenMax = binaryReader.ReadSingle();
				}
				this.mouthFixed = binaryReader.ReadSingle();
				this.tongueState = binaryReader.ReadByte();
				this.eyesLookPtn = binaryReader.ReadInt32();
				this.eyesTargetNo = binaryReader.ReadInt32();
				this.eyesTargetRate = binaryReader.ReadSingle();
				this.neckLookPtn = binaryReader.ReadInt32();
				this.neckTargetNo = binaryReader.ReadInt32();
				this.neckTargetRate = binaryReader.ReadSingle();
				this.eyesBlink = binaryReader.ReadBoolean();
				if (2 <= statusVer)
				{
					this.disableShapeMouth = binaryReader.ReadBoolean();
				}
				result = this.LoadSub(binaryReader, statusVer);
			}
		}
		return result;
	}

	// Token: 0x060011A1 RID: 4513
	public abstract bool SaveSub(BinaryWriter bw);

	// Token: 0x060011A2 RID: 4514
	public abstract bool LoadSub(BinaryReader br, int statusVer);

	// Token: 0x040017BC RID: 6076
	public int statusLoadVersion;

	// Token: 0x040017BD RID: 6077
	public byte[] clothesState;

	// Token: 0x040017BE RID: 6078
	public bool[] showAccessory;

	// Token: 0x040017BF RID: 6079
	public global::CharDefine.CoordinateType coordinateType;

	// Token: 0x040017C0 RID: 6080
	public int eyesPtn;

	// Token: 0x040017C1 RID: 6081
	public float eyesOpen = 1f;

	// Token: 0x040017C2 RID: 6082
	public float eyesOpenMin;

	// Token: 0x040017C3 RID: 6083
	public float eyesOpenMax = 1f;

	// Token: 0x040017C4 RID: 6084
	public float eyesFixed = -1f;

	// Token: 0x040017C5 RID: 6085
	public int mouthPtn;

	// Token: 0x040017C6 RID: 6086
	public float mouthOpen;

	// Token: 0x040017C7 RID: 6087
	public float mouthOpenMin;

	// Token: 0x040017C8 RID: 6088
	public float mouthOpenMax = 1f;

	// Token: 0x040017C9 RID: 6089
	public float mouthFixed = -1f;

	// Token: 0x040017CA RID: 6090
	public byte tongueState;

	// Token: 0x040017CB RID: 6091
	public int eyesLookPtn;

	// Token: 0x040017CC RID: 6092
	public int eyesTargetNo;

	// Token: 0x040017CD RID: 6093
	public float eyesTargetRate = 1f;

	// Token: 0x040017CE RID: 6094
	public int neckLookPtn;

	// Token: 0x040017CF RID: 6095
	public int neckTargetNo;

	// Token: 0x040017D0 RID: 6096
	public float neckTargetRate = 1f;

	// Token: 0x040017D1 RID: 6097
	public bool eyesBlink = true;

	// Token: 0x040017D2 RID: 6098
	public bool disableShapeMouth;
}
